import config from '@/config'
import http from '@/utils/request'

export default {
	// 客户概览
	customer: {
		// 客户概览
		overviewList: {
			url: `${config.API_URL}/customer/overviewList`,
			name: '客户概览',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 客户查询
		infoList: {
			url: `${config.API_URL}/customer/infoList`,
			name: '客户查询',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		}
	},
	// 客户详情
	customerInfo: {
		// 基础信息
		basic: {
			url: `${config.API_URL}/customerInfo/basic`,
			name: '基础信息',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 销售达成
		salesAchievement: {
			url: `${config.API_URL}/customerInfo/salesAchievement`,
			name: '销售达成',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 购进明细purchaseDetails
		purchaseDetails: {
			url: `${config.API_URL}/customerInfo/purchaseDetails`,
			name: '销售达成',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 累计销售明细
		salesDetails: {
			url: `${config.API_URL}/customerInfo/salesDetails`,
			name: '累计销售明细',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 累计购进明细
		totalPurchaseDetails: {
			url: `${config.API_URL}/customerInfo/totalPurchaseDetails`,
			name: '累计购进明细',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 库存金额
		inventoryAmountDetails: {
			url: `${config.API_URL}/customerInfo/inventoryAmountDetails`,
			name: '库存金额',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 智能预警滞销
		unsalableAlertsInfo: {
			url: `${config.API_URL}/customerInfo/unsalableAlertsInfo`,
			name: '滞销',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 智能预警断货
		supplyShortageAlertsInfo: {
			url: `${config.API_URL}/customerInfo/supplyShortageAlertsInfo`,
			name: '断货',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 智能预警商务渠道
		riskAlertsInfo: {
			url: `${config.API_URL}/customerInfo/riskAlertsInfo`,
			name: '商务渠道',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 智能预警批号
		batchNumberAlertsInfo: {
			url: `${config.API_URL}/customerInfo/batchNumberAlertsInfo`,
			name: '批号',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		// 智能预警坏货
		badGoodsAlertsInfo: {
			url: `${config.API_URL}/customerInfo/badGoodsAlertsInfo`,
			name: '坏货',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		}
	},
	// 跑店推荐
	ShopRecommendation: {
		// 基础信息
		list: {
			url: `${config.API_URL}/ShopRecommendation/list`,
			name: '基础信息',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		},
		particulars: {
			url: `${config.API_URL}/ShopRecommendation/particulars`,
			name: '基础信息',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		}
	},

	// 客户详情
	detail: {
		// 基础信息
		inventory: {
			url: `${config.API_URL}/detail/inventory`,
			name: '基础信息',
			post: async function (data = {}) {
				return await http.post(this.url, data)
			}
		}
	}
}
